"""
弹性模块 - 提供重试、熔断、限流等容错机制
"""

from .retry import (
    RetryStrategy,
    BackoffStrategy,
    ExponentialBackoff,
    LinearBackoff,
    FixedBackoff,
    RetryConfig,
    RetryManager,
    get_retry_manager,
    retry,
    retry_async
)

from .circuit_breaker import (
    CircuitBreakerState,
    CircuitBreakerConfig,
    CircuitBreaker,
    CircuitBreakerManager,
    get_circuit_breaker_manager,
    circuit_breaker
)

__all__ = [
    # 重试机制
    "RetryStrategy",
    "BackoffStrategy", 
    "ExponentialBackoff",
    "LinearBackoff",
    "FixedBackoff",
    "RetryConfig",
    "RetryManager",
    "get_retry_manager",
    "retry",
    "retry_async",
    
    # 熔断器
    "CircuitBreakerState",
    "CircuitBreakerConfig",
    "CircuitBreaker",
    "CircuitBreakerManager",
    "get_circuit_breaker_manager",
    "circuit_breaker"
]
